<template>
	<view class="top1">
		<view :class="{item1:true,active:activeIndex==='1'}" @click="navageto(1)">
			首页
		</view>
		<view :class="{item1:true,active:activeIndex==='2'}" @click="navageto(2)">
			操作页
		</view>
		<view :class="{item1:true,active:activeIndex==='3'}" @click="navageto(3)">
			消息页
		</view>
		<view :class="{item1:true,active:activeIndex==='4'}" @click="navageto(4)">
			课程页
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			activeIndex: {
				type: String,
				default: '1'
			}
		},
		data() {
			return {

			};
		},
		methods: {
			navageto(id){
				if(id===2){
					uni.navigateTo({
						url:'../home/upload/upload'
					})
				}else if(id===1){
					uni.navigateTo({
						url:'../home/home'
					})
				}
			}
		}
	}
</script>

<style lang="scss">
	
</style>
